define(()=>{
return function(goodsMsg,res){

   
    let str="";
   res.forEach( val1=>{
    
                 goodsMsg.forEach(val2=>{ 
                  //  console.log("1");
                     if(val1.goodsId===val2.id){
                      //  console.log("888");
                       str+=`     
                       <tr  index="${val1.goodsId}">
                           
                       <td  height="50px"><input type="checkbox"${val2.flag?"checked":"" } min=1 class="fxk"> </td>
                           <td width="100" height="50px"></td>
                           <td width="200"  align="left"><img src="${val1.proImg}" alt="" class="bgtp">${val1.proName}</td>
                           <td width="100" align="center">皮肤</td>
                           <td width="120">${val1.qb}Q币</td>
                           <td width="100">永久</td>
                           <td width="100"><input type="number" value="${val2.num}"  min="0" class="setNum" width="20px"></td>
                           <td width="94">无优惠</td>
                           <td width="146" class="sall">${val1.qb*val2.num}Q币</td>
                           <td width="136"><a href="">关注</a><span class="scsj">删除</span></td>
                       </tr> `
                         
                     }
                 }

                 )
           
                  
   })
       $(".spcar").html(str);


       if($('.allprice').text()==0){
          
        $(".tjan").css("background","#666");
        
       
       }else{
         $(".tjan").css("background","red") 
       
       }

}

});